package com.zkthink.ceres.order.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.zkthink.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.zkthink.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 评价关键词表
 * </p>
 *
 * @author JustArgo
 * @since 2020-07-12
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ceres_comment_keyword")
@ApiModel(value = "CommentKeyword", description = "评价关键词表")
@AllArgsConstructor
public class CommentKeyword extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 是否启用 1-启用 0-不启用
     */
    @ApiModelProperty(value = "是否启用 1-启用 0-不启用")
    @NotNull(message = "是否启用 1-启用 0-不启用不能为空")
    @TableField("enabled")
    @Excel(name = "是否启用 1-启用 0-不启用")
    private Integer enabled;

    /**
     * 关键词
     */
    @ApiModelProperty(value = "关键词")
    @NotEmpty(message = "关键词不能为空")
    @Length(max = 255, message = "关键词长度不能超过255")
    @TableField(value = "keyword", condition = LIKE)
    @Excel(name = "关键词")
    private String keyword;

    /**
     * 是否删除0否 1是
     */
    @ApiModelProperty(value = "是否删除0否 1是")
    @NotNull(message = "是否删除0否 1是不能为空")
    @TableField("is_delete")
    @Excel(name = "是否删除0否 1是")
    private Integer isDelete;


    @Builder
    public CommentKeyword(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, 
                    String keyword, Integer isDelete) {
        this.id = id;
        this.createTime = createTime;
        this.createUser = createUser;
        this.updateTime = updateTime;
        this.updateUser = updateUser;
        this.keyword = keyword;
        this.isDelete = isDelete;
    }

}
